package com.immunology.logic;

import java.io.UnsupportedEncodingException;

public class TextFieldConvertor {
	@SuppressWarnings("unused")
	private String field = null;

	public TextFieldConvertor() {

	}

	public TextFieldConvertor(String field) {
		this.field = field;
	}

	public String convertToUTF(String field) {
		return convertToUTF(field, "ISO-8859-1");
	}

	public String convertToUTF(String field, String nativeCodingType) {
		String result = "";
		try {
			result = new String(field.getBytes(nativeCodingType), "UTF-8");
		} catch (UnsupportedEncodingException e) {
			//
		}
		return result;
	}

}
